<?php
abstract class Db_Sql_Table extends Db_Query_Sql
{
    protected $table = null;
    protected $alias = null;
    protected $columns = array();
    protected $db = null;

    public function getTable()
    {
        return $this->table;
    }

    public function setTable($table)
    {
        $this->table = $table;
        return $this;
    }

    public function getAlias()
    {
        return $this->alias;
    }

    public function setAlias($alias)
    {
        $this->alias = $alias;
        return $this;
    }

    public function setDb($db)
    {
        $this->db = $db;
        return $this;
    }

    public function getDb()
    {
        return $this->db;
    }

    public function addColumn(Db_Query_Sql_Column $column)
    {
        $this->columns[$column->getId()] = $column;
        $column->setTable($this);
        return $this;
    }

    abstract public function __toString();
}
?>
